Optimal. Leaf size=79 \[ -3 a b^2 x+\frac {2 b \left (a^2+b^2\right ) \cos (c+d x)}{d}+\frac {a b^2 \cos (c+d x) \sin (c+d x)}{d}+\frac {\sec (c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2770, 2813}
\begin {gather*} \frac {2 b \left (a^2+b^2\right ) \cos (c+d x)}{d}+\frac {a b^2 \sin (c+d x) \cos (c+d x)}{d}-3 a b^2 x+\frac {\sec (c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2770
Rule 2813
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx &=\frac {\sec (c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{d}-\int (a+b \sin (c+d x)) \left (2 b^2+2 a b \sin (c+d x)\right ) \, dx\\ &=-3 a b^2 x+\frac {2 b \left (a^2+b^2\right ) \cos (c+d x)}{d}+\frac {a b^2 \cos (c+d x) \sin (c+d x)}{d}+\frac {\sec (c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.33, size = 68, normalized size = 0.86 \begin {gather*} \frac {-6 a b^2 (c+d x)+\left (6 a^2 b+3 b^3+b^3 \cos (2 (c+d x))\right ) \sec (c+d x)+2 a \left (a^2+3 b^2\right ) \tan (c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.23, size = 89, normalized size = 1.13
method | result | size |
derivativedivides | \(\frac {a^{3} \tan \left (d x +c \right )+\frac {3 a^{2} b}{\cos \left (d x +c \right )}+3 a \,b^{2} \left (\tan \left (d x +c \right )-d x -c \right )+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )}{d}\) | \(89\) |
default | \(\frac {a^{3} \tan \left (d x +c \right )+\frac {3 a^{2} b}{\cos \left (d x +c \right )}+3 a \,b^{2} \left (\tan \left (d x +c \right )-d x -c \right )+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )}{d}\) | \(89\) |
risch | \(-3 a \,b^{2} x +\frac {b^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {b^{3} {\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {2 i a^{3}+6 i a \,b^{2}+6 a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{i \left (d x +c \right )}}{d \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )}\) | \(103\) |
norman | \(\frac {-\frac {6 a^{2} b +4 b^{3}}{d}+3 a \,b^{2} x -\frac {6 a^{2} b \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 \left (9 a^{2} b +4 b^{3}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+6 a \,b^{2} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-6 a \,b^{2} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 a \,b^{2} x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {2 a \left (a^{2}+3 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {6 a \left (a^{2}+3 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {6 a \left (a^{2}+3 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a \left (a^{2}+3 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 b \left (9 a^{2}+2 b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}\) | \(289\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 70, normalized size = 0.89 \begin {gather*} -\frac {3 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a b^{2} - b^{3} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )} - a^{3} \tan \left (d x + c\right ) - \frac {3 \, a^{2} b}{\cos \left (d x + c\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 70, normalized size = 0.89 \begin {gather*} -\frac {3 \, a b^{2} d x \cos \left (d x + c\right ) - b^{3} \cos \left (d x + c\right )^{2} - 3 \, a^{2} b - b^{3} - {\left (a^{3} + 3 \, a b^{2}\right )} \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right )^{3} \sec ^{2}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 7.31, size = 123, normalized size = 1.56 \begin {gather*} -\frac {3 \, {\left (d x + c\right )} a b^{2} + \frac {2 \, {\left (a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{2} b + 2 \, b^{3}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.81, size = 103, normalized size = 1.30 \begin {gather*} -\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^3+6\,a\,b^2\right )+6\,a^2\,b+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (2\,a^3+6\,a\,b^2\right )+4\,b^3+6\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-1\right )}-3\,a\,b^2\,x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________